package com.smu.recognize.service.impl;

import com.smu.recognize.dao.AttConfigMapper;
import com.smu.recognize.model.AttConfig;
import com.smu.recognize.service.ConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ConfigServiceImpl implements ConfigService {
    @Autowired
    AttConfigMapper mapper;
    boolean flag;
    @Override
    public boolean insert(AttConfig attConfig) {
        flag=mapper.insertConfig(attConfig);
        return flag;
    }

    @Override
    public boolean delete(int id) {
        flag=mapper.deleteConfig(id);
        return flag;
    }

    @Override
    public List<AttConfig> findAll() {
        return mapper.allConfig();
    }

    @Override
    public boolean update(int id,int status) {
        return mapper.updateConfig(id,status);
    }
}
